package pv.dao.table;

import android.provider.BaseColumns;

public abstract class PlaceTable implements BaseColumns {
	public static final String TABLE_NAME = "place";
//	public static final String PLACE_ID = "place_id";
	public static final String CATEGORY_ID = "category_id";
	public static final String SUB_CATEGORY_ID = "sub_category_id";
	public static final String LATITUDE = "latitude";
	public static final String LONGITUDE = "longitude";
	public static final String NAME = "name";
	public static final String NUMBEROF = "numberOf";
	public static final String STREET = "street";
	public static final String WARD_ID = "ward_id";
	public static final String DISTRICT_ID = "district_id";
	public static final String PROVINCE_ID = "province_id";

	private static final String TEXT_TYPE = " TEXT";
	private static final String LONG_TYPE = " LONG";
	private static final String INT_TYPE = " INTEGER";
	private static final String COMMA_SEP = ",";

	public static final String SQL_CREATE_ENTRIES = "CREATE TABLE "
			+ TABLE_NAME + " (" + _ID + " INTEGER PRIMARY KEY," /*
																 * + PLACE_ID +
																 * INT_TYPE +
																 * COMMA_SEP
																 */ + CATEGORY_ID + INT_TYPE + COMMA_SEP
			+ SUB_CATEGORY_ID + INT_TYPE + COMMA_SEP + LATITUDE + LONG_TYPE
			+ COMMA_SEP + LONGITUDE + LONG_TYPE + COMMA_SEP + NAME + TEXT_TYPE
			+ COMMA_SEP + NUMBEROF + TEXT_TYPE + COMMA_SEP + STREET + TEXT_TYPE
			+ COMMA_SEP + WARD_ID + INT_TYPE + COMMA_SEP + DISTRICT_ID
			+ INT_TYPE + COMMA_SEP + PROVINCE_ID + INT_TYPE + " )";
//	public static final String SQL_CREATE_ENTRIES = "CREATE TABLE "
//			+ TABLE_NAME + " (" + _ID + " INTEGER PRIMARY KEY," + PLACE_ID
//			+ INT_TYPE + COMMA_SEP + CATEGORY_ID + INT_TYPE + COMMA_SEP
//			+ SUB_CATEGORY_ID + INT_TYPE + COMMA_SEP + LATITUDE + LONG_TYPE
//			+ COMMA_SEP + LONGITUDE + LONG_TYPE + COMMA_SEP + NAME + TEXT_TYPE
//			+ COMMA_SEP + NUMBEROF + TEXT_TYPE + COMMA_SEP + STREET + TEXT_TYPE
//			+ COMMA_SEP + WARD_ID + INT_TYPE + COMMA_SEP + DISTRICT_ID
//			+ INT_TYPE + COMMA_SEP + PROVINCE_ID + INT_TYPE + " )";

	public static final String SQL_DELETE_ENTRIES = "DROP TABLE IF EXISTS "
			+ TABLE_NAME;

}
